#include <stdio.h>
#include "Image.h"
#include "Pixel.h"

int main()
{
    Image im, imb;
    Pixel color = { 255, 128, 0 };
    Pixel color2 = { 255, 128, 255 };
    Pixel color3 = { 0, 128, 255 };


    imInit(&im, 64, 48);
    imEffacer(&im, &color);
    imDessineRectangle( &im, 10, 5, 25, 10, &color2);
    setPix(&im, 2, 2, &color2);            /* change le pixel (2,2) */
    imSauver(&im, "toto.ppm");


    imOuvrir( &imb, "toto.ppm");
    imDessineRectangle( &imb, 5, 5, 15, 10, &color3);
    imDessineRectangle( &imb, 25, 25, 35, 45, &color3);
    imSauver( &imb, "titi.ppm");

    imLibere(&im);
    imLibere(&imb);
    return 0;
}
